<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@include file="../../include/taglib.jsp"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE HTML>
<html>
<head>
<%@include file="../../include/inhead.jsp"%>
<title>汽车驿站</title>
<meta charset="utf-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="X-UA-Compatible" content="edge" />

<link rel="stylesheet" href="${ctx }/static/css/wxcss/evelent.css">
<link href="${ctx }/static/css/wxcss/glob.css" rel="stylesheet" />

</head>
<body>


	<header id="header" class="header page-header">
		<a class="j-back-link back-wrap" href="javascript:history.go(-1);">
			<i class="icon i-back"></i>
		</a>
		<div class="header-right"></div>
		<h1 class="j-page-name page-name">大家的评价</h1>
	</header>

	<c:if test="${ping == null }">
		<div id="evaluates-field" class="evaluates-field">暂无评论!</div>
	</c:if>
	<c:if test="${ping != null }">

		<div id="evaluates-field" class="evaluates-field">
			<div class="evaluates-console clearfix">
				<div class="evaluates-console-left">
					共<span id="evaluates-num">${count }</span>条评价
				</div>

			</div>
			<ul id="evaluate-list" class="evaluate-list">

				<c:forEach items="${ping }" var="l" varStatus="idx">
					<li class="evaluate-item"><input type="hidden" class="count"
						value="${l.comment_val }" />
						<div class="evaluate-sub clearfix">
							<div class="evaluate-sub-left"></div>
							<div class="evaluate-sub-right">
								<span class="evaluate-name">${l.comment_tor }</span>
							</div>
						</div>
						<div class="evaluate-content">${l.comment_content }</div>
						<div class="evaluate-time"><fmt:formatDate value="${l.comment_time}" pattern="yyyy-MM-dd "/></div></li>
				</c:forEach>
			</ul>
		</div>

	</c:if>

	<script type="text/javascript">
		$(function() {
			var count = $(".count");
			var xing = $("#evaluate-list li div .evaluate-sub-left");
			var p = "";

			for (var i = 0; i < count.length; i++) {
				if (count.eq(i).val() != 0) {
					for (var j = 0; j < count.eq(i).val(); j++) {
						p += "<i class=\"icon i-star13-light\"></i>";
					}
				}
				xing.eq(i).html(p);
				p="";
			}
		});
	</script>


</body>
</html>

